<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<script>
    function huo(n){
        if(n == 1){
            return 1;
        }else{
            return n * huo(n - 1);
        }
    }
    console.log(huo(5));
</script>
</body>
</html>